<template>
  <div>
      <div  v-for="(val,index) in list" :key="index" style="display:inline-block">
           <input v-model="newList" type="checkbox" :value="val">{{val}}
      </div>
     <h5>你选中的元素，累加的值和为：<span>{{total}}</span></h5>
  </div>
</template>

<script>
export default {
    data(){
        return{
            list:[9, 15, 19, 25, 29, 31, 48, 57, 62, 79, 87],
            newList:[]
        }
    },
   computed:{
	total(){
        return this.newList.reduce((sum,item)=>{return(sum+item)},0)
}
}
 }

</script>

<style>
div {
    margin: 5px;
}
span {
    color: red;
}
</style>